//附加功能相关逻辑
#![allow(unused)]

///返回是否开启了指定的功能
#[inline]
pub fn has_extra(flag: i32, extra: Extra) -> bool {
	(flag & 1 << Into::<u8>::into(extra)) != 0
}

#[derive(Debug)]
pub enum Extra {
	Pause,
	///测试功能
	TestFeature,
	///2;"400号码彩铃"
	VarietyBell,
	E3,
	E4,
	///5;"忙时智能彩铃提示"
	BusyBellWarm,
	///6;"使用Sip方式进行内部用户呼叫"
	SipUserCalled,
	/// 7;"400号码录音业务"
	Recording,
	/// 8;"400号码语音信箱"
	VoiceMaxbox,

	/// 9;"400号码中继功能"
	ToRelay,
	/// 10;"400号码Sip中继功能"
	ToSipTran,
	/// 11;"超级IVR"
	SuperIvr,
	E12,
	E13,
	/// 14;"400号码来电弹屏"
	PopWin,
	/// 15;"400号码防伪查询"
	Anti,
	E16,
	/// 17;"400号码总机功能"
	TotalPhone,

	/// 18;"400号码满意度调查"
	SatisfySurvey,

	/// 19;"超级IVR总机"
	SuperIvrAll,
	E20,

	/// 21;"400号码分机计费"
	NodesRate,

	/// 22;电话会议功能
	ConfGroup,

	/// 23;坐席提示
	CallTips,
	/// 24;漏话提醒
	LostCall,
	E25,
	///来电名片
	CallingCard,
	E27,
	E28,
	/// 29;报工号
	JobNumBell,

	/// 30;"六秒计费功能"
	IsSixSecond,

	/// 31;"证件不符暂停"
	IspPause,
}

impl From<Extra> for u8 {
	#[inline]
	fn from(value: Extra) -> Self {
		value as u8
	}
}
